Skip to content

Fix rdo inference and support terminal bindings and assertions - #35

Open
DavidLedvinka wants to merge 3 commits into
codex/wp-measurable-space-monadfrom
codex/refresh-rdo-core
Open

DavidLedvinka wants to merge 3 commits into
codex/wp-measurable-space-monadfrom
codex/refresh-rdo-core

Conversation

@DavidLedvinka

@DavidLedvinka DavidLedvinka commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Fix rdo blocks whose monad must be inferred from the body, and dependent matches that leave stale measurable-space instance requests. The elaborator now initializes its context with the measurable monad shape and tracks the block's initial metavariable-context depth.

Terminal pattern bindings with a fallback now supply mPure PUnit.unit for the omitted success body, preserving ordinary inference and coercions while delegating binding checks to core. Verification assertions use the measurable WP assertion gadget.

Stacked on #33 (codex/wp-measurable-space-monad), which provides the WP module. Retarget this PR to main after #33 merges.

Remove the unnecessary public import of Mathlib.MeasureTheory.MeasurableSpace.Prod from Core. Product-space instances already come through Defs and Constructions; the higher-level measurability results remain imported by RandomDo.Measurable. Clients relying on Core to re-export those additional lemmas should import the mathlib module explicitly.

The metaprogramming API renames randKind to rdo and elabRand to elabRDo; randOps now takes the initial context depth. There are no callers of those old names or signatures elsewhere in the repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant